<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="common/include :: header('新增结算单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-busCustomer-add" th:object="${busCustomer}">
        <input type="hidden" name="id" th:value="${busCustomer.id}">
        <div class="form-group">
            <label class="col-sm-3 control-label">客户姓名：</label>
            <div class="col-sm-8">
                <input name="name" class="form-control" type="text" th:field="*{name}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">联系方式：</label>
            <div class="col-sm-8">
                <input name="phone" th:field="*{phone}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生日：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="birthday" th:field="*{birthday}" class="form-control" placeholder="yyyy-MM-dd HH:mm" type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否vip：</label>
            <div class="col-sm-8">
                <select name="vip" th:field="*{vip}" class="form-control m-b">
                    <option value="true">是</option>
                    <option value="false">否</option>
                </select>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注信息：</label>
            <div class="col-sm-8">
                <input name="remark" th:field="*{remark}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="common/include :: footer" />
<th:block th:include="common/include :: datetimepicker" />
<script th:inline="javascript">
    var prefix = ctx + "/business/busCustomer"
    $("#form-busCustomer-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-busCustomer-add').serialize());
        }
    }

    $("input[name='birthday']").datetimepicker({
        format: "yyyy-mm-dd hh:ii",
        autoclose: true
    });
</script>
</body>
</html>